package com.UnionPayCenter.enums;


/**
* @ClassName:
* @Description:
* @Author: bite 
* @Date: 2019/3/5 
*/ 
public enum SexEnum implements CodeBaseEnum{

    WOMAN(0,"女"),
    MAN(1,"男"),
    UNKNOW(2,"未知");


    private int code;
    private String msg;

    public String msg() {
        return msg;
    }

    public int code() {
        return code;
    }

    SexEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static SexEnum getEnum(int code) {
        for (SexEnum ele : SexEnum.values()) {
            if (ele.code() == code) {
                return ele;
            }
        }
        return null;
    }
}
